﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Adv_UserAuth数据模型对象
    /// </summary>
    [Serializable]
    public partial class Adv_UserAuthMod
    {
        /// <summary>
        /// 初始化Adv_UserAuth数据模型对象
        /// </summary>
        public Adv_UserAuthMod()
        {
            
        }
        /// <summary>
        /// 初始化Adv_UserAuth数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="userID">UserID</param>
        /// <param name="authID">AuthID</param>
        public Adv_UserAuthMod(string userID,string authID)
        {
            //给UserID字段赋值
            this.UserID = userID;
            //给AuthID字段赋值
            this.AuthID = authID;
        }
        
		//属性存储数据的变量
        private string _userID;
        private string _authID;
        
        /// <summary>
        /// UserID
        /// </summary>
        public string UserID
        {
            get { return this._userID; }
            set { this._userID = value; }
        }
        /// <summary>
        /// AuthID
        /// </summary>
        public string AuthID
        {
            get { return this._authID; }
            set { this._authID = value; }
        }
        
        /// <summary>
        /// 对比两个Adv_UserAuth数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Adv_UserAuth数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Adv_UserAuth数据模型对象
            Adv_UserAuthMod adv_UserAuthMod = obj as Adv_UserAuthMod;
            //判断是否转换成功
            if (adv_UserAuthMod == null) return false;
            //进行匹配属性的值
            return
                //判断UserID是否一致
                this.UserID == adv_UserAuthMod.UserID &&
                //判断AuthID是否一致
                this.AuthID == adv_UserAuthMod.AuthID;
        }
        /// <summary>
        /// 将当前Adv_UserAuth数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Adv_UserAuth数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将UserID进行按位异或运算处理
                (this.UserID == null ? 2147483647 : this.UserID.GetHashCode()) ^
                //将AuthID进行按位异或运算处理
                (this.AuthID == null ? 2147483647 : this.AuthID.GetHashCode());
        }
        /// <summary>
        /// 将当前Adv_UserAuth数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Adv_UserAuth数据模型对象转换成字符串副本
            return
                "[" +
                //将UserID转换成字符串
                this.UserID + "," +
                //将AuthID转换成字符串
                this.AuthID +
                "]";
        }
    }
}
